﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
using Models;

namespace CSMF
{
    public partial class MayorList : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindVideo1();
            }
        }

        protected string GetStyle(object vid, object id, int index)
        {
            string style = "";
            if (vid == null)
            {
                if (index == 0)
                {
                    style = "currentBtn";
                }
            }
            else
            {
                if (Convert.ToInt32(vid) == Convert.ToInt32(id))
                {
                    style = "currentBtn";
                }
            }
            return style;
        }

        protected void BindVideo1()
        {
            IList<Mayor> video = MayorManager.GetAllMayors();
            Repeater1.DataSource = video;
            Repeater1.DataBind();
        }


        protected void LinkButton1_Click(object sender, EventArgs e)
        {
            Session["SearchTitle"] = txtSearch.Text.Trim();
            Response.Redirect("SearchMerak.aspx");
        }
    }
}